home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / comm / tcp / ATCP_src_22.lha / AmiTCP-2.2 / src / amitcp / sys / uio.h < prev   
Encoding:
C/C++ Source or Header  |  1993-08-12  |  3.2 KB  |  109 lines

  1. /*
  2.  * $Id: uio.h,v 1.5 1993/06/04 11:16:15 jraja Exp $
  3.  *
  4.  * Copyright (c) 1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
  5.  *                    Helsinki University of Technology, Finland.
  6.  *                    All rights reserved.
  7.  *
  8.  * HISTORY
  9.  * $Log: uio.h,v $
  10.  * Revision 1.5  1993/06/04  11:16:15  jraja
  11.  * Fixes for first public release.
  12.  *
  13.  * Revision 1.4  1993/05/17  01:02:04  ppessi
  14.  * Changed RCS version
  15.  *
  16.  * Revision 1.3  1993/03/03  18:27:10  jraja
  17.  * Cleanup2.
  18.  *
  19.  * Revision 1.2  93/03/03  15:23:05  15:23:05  jraja (Jarno Tapio Rajahalme)
  20.  * Cleanup.
  21.  * 
  22.  * Revision 1.1  93/02/23  11:34:25  11:34:25  too (Tomi Ollila)
  23.  * Initial revision
  24.  */
  25.  
  26. /*
  27.  * Copyright (c) 1982, 1986 The Regents of the University of California.
  28.  * All rights reserved.
  29.  *
  30.  * Redistribution and use in source and binary forms, with or without
  31.  * modification, are permitted provided that the following conditions
  32.  * are met:
  33.  * 1. Redistributions of source code must retain the above copyright
  34.  *    notice, this list of conditions and the following disclaimer.
  35.  * 2. Redistributions in binary form must reproduce the above copyright
  36.  *    notice, this list of conditions and the following disclaimer in the
  37.  *    documentation and/or other materials provided with the distribution.
  38.  * 3. All advertising materials mentioning features or use of this software
  39.  *    must display the following acknowledgement:
  40.  *    This product includes software developed by the University of
  41.  *    California, Berkeley and its contributors.
  42.  * 4. Neither the name of the University nor the names of its contributors
  43.  *    may be used to endorse or promote products derived from this software
  44.  *    without specific prior written permission.
  45.  *
  46.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  47.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  48.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  49.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  50.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  51.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  52.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  53.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  54.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  55.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  56.  * SUCH DAMAGE.
  57.  *
  58.  *    @(#)uio.h    7.8 (Berkeley) 4/15/91
  59.  */
  60.  
  61. #ifndef SYS_UIO_H
  62. #define    SYS_UIO_H
  63.  
  64. struct iovec {
  65.     caddr_t    iov_base;
  66.     int    iov_len;
  67. };
  68.  
  69. #ifndef AMITCP
  70. enum    uio_rw { UIO_READ, UIO_WRITE };
  71.  
  72. /*
  73.  * Segment flag values.
  74.  */
  75. enum    uio_seg {
  76.     UIO_USERSPACE,        /* from user data space */
  77.     UIO_SYSSPACE,        /* from system space */
  78.     UIO_USERISPACE        /* from user I space */
  79. };
  80. #endif /* !AMITCP */
  81.  
  82. struct uio {
  83. #ifndef AMITCP
  84.     struct    iovec *uio_iov;
  85.     int    uio_iovcnt;
  86.     off_t    uio_offset;
  87.     int    uio_resid;
  88.     enum    uio_seg uio_segflg;
  89.     enum    uio_rw uio_rw;
  90.     struct    proc *uio_procp;
  91. #else
  92.     struct    iovec *uio_iov;
  93.     int    uio_iovcnt;
  94.     int    uio_resid;
  95.     struct    SocketBase *uio_procp;
  96. #endif    
  97. };
  98.  
  99.  /*
  100.   * Limits
  101.   */
  102. #define UIO_MAXIOV    1024        /* max 1K of iov's */
  103. #define UIO_SMALLIOV    8        /* 8 on stack, else malloc */
  104.  
  105. #endif /* !SYS_UIO_H */
  106.  
  107.  
  108.  
  109.